
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>SpaceLab</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="_token" content="{{ csrf_token() }}"/>
    <!-- Favicon -->
    <link rel="shortcut icon" href="{{asset('admin/img/favicon.ico')}}" type="image/x-icon">
    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="{{asset('admin/plugins/bootstrap/css/bootstrap.min.css')}}">
    <!-- Fonts from Font Awsome -->
    <link rel="stylesheet" href="{{asset('admin/css/font-awesome.min.css')}}">
    <!-- CSS Animate -->
    <link rel="stylesheet" href="{{asset('admin/css/animate.css')}}">
    <!-- Custom styles for this theme -->
    <link rel="stylesheet" href="{{asset('admin/css/main.css')}}">
    <!-- iCheck-->
    <link rel="stylesheet" href="{{asset('admin/plugins/icheck/css/_all.css')}}">
    <!-- Fonts -->
    <!-- <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,900,300italic,400italic,600italic,700italic,900italic' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'> -->
    <!-- Feature detection -->
    <script src="{{asset('admin/js/modernizr-2.6.2.min.js')}}"></script>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="assets/js/html5shiv.js"></script>
    <script src="assets/js/respond.min.js"></script>
    <![endif]-->
    <style>
        .pagination{
            float: right;
            margin: 0px ;
        }
        .mail-option{
            margin: 0 0 15px;
        }
        body{
        	background:transparent;
        }
    </style>
</head>
<body>

<div class="panel col-md-6 col-sm-12" id="view-mail-wrapper">
    <div class="panel-body">
        <header>
            <h2>{{$res->title}}</h2>
            <p class="pull-right">日期{{$res->creat_at}}</p>
        </header>
        <div class="row view-mail-header">
            <div class="col-md-8 ">
                <img src="assets/img/avatar4.gif" alt="" class="img-circle">
                <strong><a href="#">{{$res->name}}</a>
            </div>
            <div class="col-md-4">
                <div class="view-mail-reply pull-right">
                	<!-- <from action="" method="post">
                		{!! csrf_field() !!}
                		<input type="delete">
                		<input type="button" class="btn btn-sm btn-primary" value="">
                	</from> -->
                    <button class="btn btn-sm btn-primary"><i class="fa fa-bookmark warning-txt"></i>变热门</button>
                    <button class="btn btn-default btn-sm tooltips" data-original-title="Trash" data-toggle="tooltip" data-placement="top" title="Trash"><i class="fa fa-trash-o"></i>
                    </button>
                </div>
            </div>
        </div>
        <!-- 留言内容开始 -->
        <div class="row">
            <div class="col-md-12">

                <div class="panel view-mail-body">
                    <div class="panel-body">
                        {{$res->content}}
                    </div>
                </div>
            </div>
        </div>
    </div>
<!-- 留言内容结束 -->
</body>
<script src="{{asset('admin/js/jquery-1.10.2.min.js')}}"></script>
    <script src="{{asset('admin/plugins/bootstrap/js/bootstrap.min.js')}}"></script>
    <script src="{{asset('admin/plugins/waypoints/waypoints.min.js')}}"></script>
    <script src="{{asset('admin/js/application.js')}}"></script>
    <!--Page Level JS-->
    <script src="{{asset('admin/plugins/icheck/js/icheck.min.js')}}"></script>
    <script>
    $(document).ready(function() {
        $('input').iCheck({
            checkboxClass: 'icheckbox_flat-green'
        });
        $('.tooltips').tooltip()

    });
    </script>
<script  type="text/javascript">
    var a = document.getElementsByTagName('button')[0];
    var b = document.getElementsByTagName('button')[1];
    a.onclick = function (){
        var xhr = new XMLHttpRequest();
    	var token = "{{ csrf_token() }}";
        xhr.onreadystatechange = function (){
	        if(this.readyState == 4){
        	    var j = this.responseText;
	            
            	alert(j);
	        }
	    } 
	    // &_token='+token
	    xhr.open('POST','',true);
        xhr.setRequestHeader('X-CSRF-TOKEN',token);
        xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');
        var data = 'status= status';
        xhr.send(data);
	}
	b.onclick = function (){
		var xhr = new XMLHttpRequest();
    	var token = document.getElementsByName('_token')[0].content;
        xhr.onreadystatechange = function (){
	        if(this.readyState == 4){
        	    var j = this.responseText;
            	alert(j);
	        }
	    } 
	    xhr.open('POST','',true);
        xhr.setRequestHeader('X-CSRF-TOKEN',token);
        xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');
        var data = 'delete= delete';
        xhr.send(data);
	}
</script >
</html>